package com.central.post.pojo.post

import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.central.common.enum.PostTypeEnum
import com.central.common.model.CommentVo
import com.central.common.model.UserInfo
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty


@ApiModel("帖子查询条件")
data class PostDto(

    @ApiModelProperty("搜索条件0: 全部 1.关注 2.同城 3.我的") var type: Int? = 0,
    @ApiModelProperty("经度") var longitude: String? = "0.0",
    @ApiModelProperty("维度") var latitude: String? = "0.0",
    @ApiModelProperty("发布内容") var content: String? = null,
    @ApiModelProperty("页数") var pageNum: Long? = 10,
    @ApiModelProperty("帖子id") var postId: Long? = null,
    @ApiModelProperty("用户id") var userId: String? = null,
    @ApiModelProperty("每页大小") var pageSize: Long? = 1
)


@ApiModel("帖子列表返回实体")
data class PostVo(

    @ApiModelProperty("id") var id: Long? = null,
    @ApiModelProperty("用户信息") var userInfo: UserInfo? = null,
    @ApiModelProperty("帖子id") var postId: Long? = null,
    @ApiModelProperty("上级id(话题贴)") var pid: Long? = 0L,
    @ApiModelProperty("发布内容") var content: String? = "",
    @ApiModelProperty("发布图片") var pics: List<String>? = null,
    @ApiModelProperty("经度") var longitude: String? = "",
    @ApiModelProperty("维度") var latitude: String? = "",
    @ApiModelProperty("距离") var distance: String? = "",
    @ApiModelProperty("发布详细地址") var publishAddress: String? = "",
    @ApiModelProperty("评论数") var commentCount: Long? = 0,
    @ApiModelProperty("点赞数") var likeCount: Int? = 0,
    @ApiModelProperty("是否关注") var booleanAttention: Boolean? = false,
    @ApiModelProperty("是否点赞") var booleanLike: Boolean? = false,
    @ApiModelProperty("发布时间") var createTime: String? = null,
    @ApiModelProperty("评论信息") var commentInfo: Page<CommentVo>? = null,
    @ApiModelProperty("话题标签(话题)") var topicContent: String? = null,
    @ApiModelProperty("总分(话题)") var totalScore: Double? = 5.0,
    @ApiModelProperty("质量分数(话题)") var qualityScore: Double? = 5.0,
    @ApiModelProperty("面料分数(话题)") var liningScore: Double? = 5.0,
    @ApiModelProperty("版型分数(话题)") var modelScore: Double? = 5.0,
    @ApiModelProperty("帖子类型(1: 帖子 2: 话题)") var postType: Int? = PostTypeEnum.POST.code
)

@ApiModel("帖子添加或者编辑参数")
data class PostSaveOrUpdateDto(

    var id: Long? = null,

    @ApiModelProperty("发布内容")
    var content: String? = "",

    @ApiModelProperty("发布图片")
    var pics: String? = null,

    @ApiModelProperty("经度")
    var longitude: String? = "0.0",

    @ApiModelProperty("维度")
    var latitude: String? = "0.0",
)

@ApiModel("后台管理员发布话题贴dto")
data class BackPostSaveOrUpdateDto(

    var id: Long? = null,

    @ApiModelProperty("发布内容")
    var content: String? = "",

    @ApiModelProperty("发布图片")
    var pics: String? = null,
)

@ApiModel("发布话题贴dto")
data class TopicPostSaveDto(

    @ApiModelProperty("上级id(话题贴)")
    var pid: Long? = 0L,

    @ApiModelProperty("发布内容")
    var content: String? = "",

    @ApiModelProperty("发布图片")
    var pics: String? = null,

    @ApiModelProperty("经度")
    var longitude: String? = "0.0",

    @ApiModelProperty("维度")
    var latitude: String? = "0.0",

    @ApiModelProperty("总分(话题)")
    var totalScore: Double? = 5.0,

    @ApiModelProperty("质量分数(话题)")
    var qualityScore: Double? = 5.0,

    @ApiModelProperty("面料分数(话题)")
    var liningScore: Double? = 5.0,

    @ApiModelProperty("版型分数(话题)")
    var modelScore: Double? = 5.0,
)

@ApiModel("话题帖子详情")
data class TopicPostDetailVo(

    @ApiModelProperty("发布人头像")
    var publishHeadUrl: String? = "",

    @ApiModelProperty("发布人名称")
    var PublishUsername: String? = "甜窝小助理",

    @ApiModelProperty("话题贴id")
    var id: Long? = null,

    @ApiModelProperty("发布内容")
    var content: String? = "",

    @ApiModelProperty("发布图片")
    var pics: List<String>? = null,

    @ApiModelProperty("回复用户的头像")
    var replyUserHeadUrl: List<String>? = null,

    @ApiModelProperty("帖子数量")
    var postCount: Long? = 0L,

    @ApiModelProperty("是否关注")
    var booleanAttention: Boolean? = false,

    @ApiModelProperty("总分(话题)")
    var totalScore: Double? = 5.0,

    @ApiModelProperty("质量分数(话题)")
    var qualityScore: Double? = 5.0,

    @ApiModelProperty("面料分数(话题)")
    var liningScore: Double? = 5.0,

    @ApiModelProperty("版型分数(话题)")
    var modelScore: Double? = 5.0,

    @ApiModelProperty("评分人数")
    var markCount: Long? = 0L
)

@ApiModel("话题帖子筛选条件")
data class TopicPostSearchDto(

    @ApiModelProperty("话题帖子id")
    var pid: Long? = null,

    @ApiModelProperty("帖子id")
    var id: Long? = null,

    @ApiModelProperty("筛选类型 1: 最新 2: 最热")
    var type: Int? = 1,
)

